<?php

use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;
use Dcat\Admin\Admin;

Admin::routes();

Route::group([
    'prefix'     => config('admin.route.prefix'),
    'namespace'  => config('admin.route.namespace'),
    'middleware' => config('admin.route.middleware'),
], function (Router $router) {

    $router->get('/', 'HomeController@index');
    $router->resource('user_posture', 'UserPostureController');
    $router->resource('user_part', 'UserPartController');
    $router->resource('user_symptom', 'UserSymptomController');

    $router->resource('user', 'UserController');
    $router->resource('fitness_form', 'FitnessFormController');
    $router->resource('health_form', 'UserHealthController');

    $router->get('user_fitness', 'FitnessFormController@userFitness');
    $router->any('add_user_fitness', 'FitnessFormController@addUserFitness');

    $router->get('user_health', 'UserHealthController@userHealth');
    $router->any('add_user_health', 'UserHealthController@addUserHealth');

    $router->get('user_health_2', 'UserHealth2Controller@userHealth');
    $router->any('add_user_health_2', 'UserHealth2Controller@addUserHealth');

    $router->get('user_balance_flow', 'UserBalanceFlowController@balanceFlow');
    $router->get('user_balance_flow/delete', 'UserBalanceFlowController@deleteFlow');
});
